#ifndef __IRC_BOT
#define __IRC_BOT

#ifdef _WIN32
#pragma comment(lib, "ws2_32.lib")
#define snprintf sprintf_s

#include <winsock2.h>
#include <windows.h>
#else
#define SOCKET int
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "ircchannel.h"

typedef struct _irc_info {
	char			*nick;
	char			*user;
	char			*server;
	irc_channel_t	*channels;
	int				port;
	SOCKET			sockfd;
} irc_info_t;

#define MAX_LEN	513 // 512 + '\0'

#ifndef BOOL
	#define BOOL	int
	#define TRUE	1
	#define FALSE	0
#endif


BOOL irc_connect(irc_info_t *);
//TODO:
//irc_quit()

BOOL irc_read(irc_info_t *, char *);
BOOL irc_write_raw(irc_info_t *, char *);
//TODO:
//irc_write_channel()
//irc_write_person()

//TODO:
// 
void irc_part(irc_info_t *, char *);
BOOL irc_join(irc_info_t *, char *);

#endif
